package com.offcn.Servlet;

import java.io.IOException;
import java.io.PrintWriter;

public class ajaxTextServlet extends javax.servlet.http.HttpServlet {
    protected void doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, IOException {
                doGet(request,response);
    }

    protected void doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, IOException {
        String name = request.getParameter("name");
        String age = request.getParameter("age");
        System.out.println("name"+name+"________"+"age"+age);
        PrintWriter writer = response.getWriter();
        writer.write("ajax被调用了");
    }
}
